package ca.ericslandry.shared.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Id;

import com.google.appengine.api.datastore.Email;

public class User implements Serializable {
	private static final long serialVersionUID = 8342667126342873177L;
	@Id
	Long id;
	String openID;
	Email email;
	String displayName;
	String realName;
	Date creationDate;
	String geohash;

	public User() {
	}

	public User(String openID, String email, String displayName, String realName, String postalCode, String geohash) {
		this.openID = openID;
		this.email = new Email(email);
		this.displayName = displayName;
		this.realName = realName;
		this.creationDate = new Date();
		this.geohash = geohash;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getOpenID() {
		return openID;
	}

	public void setOpenID(String openID) {
		this.openID = openID;
	}

	public Email getEmail() {
		return email;
	}

	public void setEmail(Email email) {
		this.email = email;
	}

	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public String getGeohash() {
		return geohash;
	}

	public void setGeohash(String geohash) {
		this.geohash = geohash;
	}
}
